$(function () {
    $("#console-delete-users-btn").click("click", function () { // 绑定查询按扭
        var user_to_delete_codes = $('[name=user_to_delete_codes]').val();
        if (user_to_delete_codes == '') {
            layer.msg("请填写用户编码，多个以逗号分隔");
            return;
        }
        layer.confirm('是否执行该操作？', function (index) {
            var url = rootPath + '/console/deleteUser.shtml';
            var s = CommnUtil.ajax(url, {
                user_to_delete_codes: user_to_delete_codes
            }, "json");
            if (s == "success") {
                layer.msg('成功');
                grid.loadData();
            } else {
                layer.msg('失败');
            }
        });
    });
});
